import sys
import os
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)

###from myca.car import Car 
###import myca.car as car ###三种导包方式都可以
import myca.car

class Bmw(myca.car.Car):
    def __init__(self, manufcturer, model, year):
        super().__init__(manufcturer, model, year)
        self.MiniBmw = MiniBmw()

class MiniBmw(Bmw):
    def __init__(self, Motor_size=60):
        """初始化发动机属性"""
        self.Motor_size = Motor_size


    def describe_motor(self):
        """输出发动机参数"""
        print("这款车的发动几参数是："+ str(self.Motor_size)+" 6缸，3.0T涡轮增压，225KM。")

my_bmw = Bmw("宝马","535Li",'2017款')
dec_name  = my_bmw.get_car_name()
print(dec_name)
my_bmw.read_licheng()
my_bmw.MiniBmw.describe_motor()

